xen.git
20 years ago This patch is to fix the NIC driven mechanism to make it event
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:47:59 +0000 (16:47 +0100)]
    This patch is to fix the NIC driven mechanism to make it event
driven. We will also send it to Qemu mailing list.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoOnce grant refs run out, netfront prints a nice message, but doesn't set
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:43:05 +0000 (16:43 +0100)]
Once grant refs run out, netfront prints a nice message, but doesn't set
err properly to notify the caller, and the domU crashes. (See bug 183 for
details).

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
20 years agoSmall shadow pagetable fixes.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:40:05 +0000 (16:40 +0100)]
Small shadow pagetable fixes.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xin B Li <xin.b.li@intel.com>
20 years agoRemove out: label, to silence warning.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 14:42:02 +0000 (15:42 +0100)]
Remove out: label, to silence warning.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 13:00:35 +0000 (14:00 +0100)]
Merged.

20 years agoDon't schedule work for reboot if work is already scheduled. This fixes a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:52:38 +0000 (13:52 +0100)]
Don't schedule work for reboot if work is already scheduled.  This fixes a
problem whereby migrated domains would shut themselves down immediately,
because the watch from the removal of the control/shutdown node would fire
after the workqueue had started, but before the domain was suspended, meaning
that an additional piece of work was scheduled, which ran immediately after the
domain was resumed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the interface between XendRoot.get_network_script and Vifctl so that a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:48:34 +0000 (13:48 +0100)]
Change the interface between XendRoot.get_network_script and Vifctl so that a
list is passed rather than a single string.  This expands the config-file
interface so that parameters may be passed to the network scripts from the
config file.

Fix XendRoot._logError (missing asterisk before args parameter).

In XendRoot, allow an empty configuration file.  This makes it easier to unit
test code reliant on XendRoot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:45:06 +0000 (13:45 +0100)]
Don't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
no bridge parameter and let the vif-bridge script find one for itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded test_create.py, a test script for create.py. This contains a unit test
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:42:30 +0000 (13:42 +0100)]
Added test_create.py, a test script for create.py.  This contains a unit test
for the command line parsing code in xm create.  To make it easier to test,
create.py has changed in structure around the main(argv) function, adding a new
parseCommandLine function.

Remove a large number of useless parameters, where the opts structure was being
passed all over the place, just to eventually log through it.  Instead two
methods -- err and warn -- have been broken out from the Opts class, and there
is now no need to pass the opts value everywhere.

Change the parsing inside make_config to remove lots of cut-and-pasted cruft.

Change the documentation to the vif command to indicate that the bridge can be
auto-detected.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xen.xm.tests package to build.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:34:12 +0000 (13:34 +0100)]
Added xen.xm.tests package to build.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xen-script-common.sh, for functions common to all scripts, not just the
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:33:17 +0000 (13:33 +0100)]
Added xen-script-common.sh, for functions common to all scripts, not just the
hotplug ones.  Added evalVariables and findCommand functions to that, which we
use to clarify the handling of variables being passed in as command line
variables.

Make vif-bridge able to find the bridge for itself if only one bridge is in
use.  This means that it is not necessary to specify a bridge in many
configurations.  Allow the bridge to be specified on the command line, meaning
that a default may be provided in the xend-config.sxp if desired.

Added xenstore_read_default to xen-hotplug-common.sh, which reads from the
store but uses a given default if the path in the store is not present.  This
is used by vif-bridge to allow the store details (i.e. those given to xm create)
to override the default value given in the xend-config.sxp.

Remove vif-bridge setting -- the value can be specified on the vif-script
command line if necessary.

Added examples for network-nat/vif-nat.

Added lots of big comments.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoPrint out MFN in audit code, for debugging purposes.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:24:45 +0000 (13:24 +0100)]
Print out MFN in audit code, for debugging purposes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFree domain names in xenstat_free_node, fixing small memory leak.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:23:21 +0000 (13:23 +0100)]
Free domain names in xenstat_free_node, fixing small memory leak.

Thanks to Anthony Liguori for spotting the leak.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix floating-point corruption (a nasty race in fp task-switch
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 09:45:49 +0000 (10:45 +0100)]
Fix floating-point corruption (a nasty race in fp task-switch
exception handling).
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a commented-out sanity check for lazy fpu switching.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 08:39:55 +0000 (09:39 +0100)]
Add a commented-out sanity check for lazy fpu switching.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Sat, 29 Oct 2005 08:51:35 +0000 (09:51 +0100)]
merge

20 years agoPrevent event listener socket from being inherited by children.
jbulpin@wicket.uk.xensource.com [Sat, 29 Oct 2005 00:58:00 +0000 (01:58 +0100)]
Prevent event listener socket from being inherited by children.
This was passing down to dhclient which was keeping the 8001 port
open and preventing xend restarting.

Also fixed a case typo in setCloExec

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoRemove next_io_page field from domain structure.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 16:51:37 +0000 (17:51 +0100)]
Remove next_io_page field from domain structure.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up the 'initial mapping' area properly on x86/64.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 16:11:59 +0000 (17:11 +0100)]
Clean up the 'initial mapping' area properly on x86/64.
We must completely blow away mappings of the original
p2m table and the initrd. Those areas eventually get freed
to the memory allocator and other uses of that memory will
get really confused by spurious redundant mappings in the
init mapping area.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix sizeof_vcpu_shift in x86/64 xen_entry.S.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 15:41:11 +0000 (16:41 +0100)]
Fix sizeof_vcpu_shift in x86/64 xen_entry.S.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix reboot logic. An indentation error meant that every second reboot would
emellor@leeni.uk.xensource.com [Fri, 28 Oct 2005 12:02:06 +0000 (13:02 +0100)]
Fix reboot logic.  An indentation error meant that every second reboot would
be refused, with the domain being destroyed instead.

Further fix for reboot logic when using on_reboot=rename-restart: the incorrect
node was being removed once restart has completed, leaving Xend to conclude
later that it had crashed in the middle of a restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThis patch provide local APIC support for vmx guest.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Oct 2005 08:48:46 +0000 (09:48 +0100)]
This patch provide local APIC support for vmx guest.

A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoxm help notes that domid can be used in place of domname.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 17:22:45 +0000 (18:22 +0100)]
xm help notes that domid can be used in place of domname.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoNo side effects in BUG_ON statements in Xen.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 17:21:57 +0000 (18:21 +0100)]
No side effects in BUG_ON statements in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTo allow kernel to handle radically different hypervisors in the future,
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:47:53 +0000 (17:47 +0100)]
To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
20 years agoI've created a patch to get the mini-os to compile in Xen-unstable. The patch
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:43:29 +0000 (17:43 +0100)]
I've created a patch to get the mini-os to compile in Xen-unstable. The patch
is pretty big, but this is mostly because I've replaced hypervisor.h with the
hypercalls.h header file from Linux (which seems easier to maintain
anyway). I've ignored X86_64.

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
20 years agoOriginally in qemu when a IDE dma transfer is started which is triggered
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:29:39 +0000 (17:29 +0100)]
Originally in qemu when a IDE dma transfer is started which is triggered
by access to 0xc000 port in VMX, qemu will blocked there until it
finished. And during that block, there are extra dom switches between
dom0 and idle domain, and VMX can't be resumed. By making real IDE dma
tranfer run in another thread, qemu will return and VMX resume on time
and there are fewer cycle wasted.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
20 years agoThe attached patch fixes 2 issues with the scripts written for the Xen
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:27:04 +0000 (17:27 +0100)]
The attached patch fixes 2 issues with the scripts written for the Xen
access control module and makes the tools more self-explanatory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoThis patch
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:24:06 +0000 (17:24 +0100)]
This patch

* adapts the Xen access control module to recent changes in the "unbound
event channel" interface and its usage
* adds checks that became necessary because of domain structures "hanging
around" in the domain list after domain destruction

This patch is tested on today's xen-unstable with Null, CHWALL, STE,
CHWALL_STE policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>

20 years agoRemove all binaries on make clean.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:20:33 +0000 (17:20 +0100)]
Remove all binaries on make clean.

20 years agoRemove a non-portable and unused error.h, and use signal.h not
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:16:48 +0000 (17:16 +0100)]
Remove a non-portable and unused error.h, and use signal.h not
sys/signal.h (in tools/misc).

20 years agoUse standard int typedefs.
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:16:12 +0000 (17:16 +0100)]
Use standard int typedefs.

Signed-off-by: John Levon <levon@movementarian.org>
20 years agoBUG_ON() is a macro very very similar to assert(), and it's a really bad
kaf24@firebug.cl.cam.ac.uk [Thu, 27 Oct 2005 16:09:01 +0000 (17:09 +0100)]
BUG_ON() is a macro very very similar to assert(), and it's a really bad
idea in general to put statements with side-effects inside such a construct
(for example the BUG_ON() could be compiled away for non-debug builds).

The patch below fixes this for the drivers/xen tree.

I chose the general construct to store the respective return values in a
local var instead of an if (...) BUG(); because it looks like most of these
BUG_ON()'s need to be replaced by real error handling when going towards
production releases anyway, and then the local variable is going to be
needed anyway. (and besides the if construct tends to get unreable due to
the unlikely() etc).

Please apply.

Greetings,
   Arjan van de Ven

20 years agoFix Jerone Young's xenstat / xenstore patch:
emellor@leeni.uk.xensource.com [Thu, 27 Oct 2005 09:53:02 +0000 (10:53 +0100)]
Fix Jerone Young's xenstat / xenstore patch:

Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago* Enable xenstat to use xenstore
jeroney@localhost.localdomain [Thu, 27 Oct 2005 09:19:58 +0000 (10:19 +0100)]
* Enable xenstat to use xenstore
* Have xentop display names instead of DomIDs
  as requested in Bugzilla#311 filed by Ian

20 years agoFix the check for non-existence of the save/restore directories, by using &&
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 15:59:13 +0000 (16:59 +0100)]
Fix the check for non-existence of the save/restore directories, by using &&
rather than -a.  The former shortcuts at the script level, whereas the latter
does not, which means that the backtick-enclosed arguments are evaluated
regardless of the success of preceding tests.

Tidy the aforementioned test into a function of its own.

Add an implementation of usleep for those systems that only have sleep (Debian,
for example).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove exception handler for sxp.ParseError above that for Exception, as the
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:59:29 +0000 (14:59 +0100)]
Move exception handler for sxp.ParseError above that for Exception, as the
latter subsumes the former.  Minor tidy-ups.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoBreak the write_dev function out from block into new block-common.sh, where it
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:58:13 +0000 (14:58 +0100)]
Break the write_dev function out from block into new block-common.sh, where it
can also be used by block-enbd and block-nbd.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded copyright notice.
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:57:16 +0000 (14:57 +0100)]
Added copyright notice.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNew xendomains init script, courtesy of Kurt Garloff:
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 13:55:32 +0000 (14:55 +0100)]
New xendomains init script, courtesy of Kurt Garloff:

It now allows the user to configure what he wants to be done on
xendomains stop: sysrq, migrate, save, or shutdown.
For this to be safe, a timeout has been introduced (optional).
On start, saved domains may be restored, and not yet started
domains from the auto start dir will be started in addition.
status reports missing domains, restart and reload work as well.

The init script is somewhat SUSE-ish, but it should work on LSB
compliant and on RH based distros as well.

I would appreciate this to be put into tools/examples/init.d/

Signed-off-by: Kurt Garloff <garloff@suse.de>
20 years agoCheck whether dom is NULL when we handle a watch. This might occur if the
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 12:41:00 +0000 (13:41 +0100)]
Check whether dom is NULL when we handle a watch.  This might occur if the
domain has recently been removed from our list, but with a watch still in
flight.  This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded comment.
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 11:06:58 +0000 (12:06 +0100)]
Added comment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove second decleration of .PHONY & cleanup formating
jeroney@localhost.localdomain [Tue, 25 Oct 2005 16:37:00 +0000 (17:37 +0100)]
Remove second decleration of .PHONY & cleanup formating

20 years agoFix format spec for tracing.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 15:00:49 +0000 (16:00 +0100)]
Fix format spec for tracing.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNBD scripts, courtesy of Kurt Garloff:
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:52:56 +0000 (11:52 +0100)]
NBD scripts, courtesy of Kurt Garloff:

For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:24:01 +0000 (11:24 +0100)]
Merged.

20 years agoMoved SuSE-specific getcfg call into a preiftransfer call. The semantics of
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:22:47 +0000 (11:22 +0100)]
Moved SuSE-specific getcfg call into a preiftransfer call.  The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOops, missed hg add of vti example file
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 03:00:35 +0000 (21:00 -0600)]
Oops, missed hg add of vti example file

20 years agoNecessary change to support ia64/vti domain build in common code.
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 02:57:47 +0000 (20:57 -0600)]
Necessary change to support ia64/vti domain build in common code.

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoImage builder for ia64/vti domain, together with a example config file.
djm@kirby.fc.hp.com [Tue, 25 Oct 2005 02:56:53 +0000 (20:56 -0600)]
Image builder for ia64/vti domain, together with a example config file.

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoDon't run network stop script when doing xend stop.
chris@ubuntu.eng.hq.xensource.com [Tue, 25 Oct 2005 02:04:30 +0000 (19:04 -0700)]
Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoCode reordering for (partial) gcc3.4 compatibility
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:41:27 +0000 (11:41 -0600)]
Code reordering for (partial) gcc3.4 compatibility
Signed-off-by Akio Takabe <takebe_akio@jp.fujitsu.com>

20 years agoRemove dup prologue lines
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:32:45 +0000 (11:32 -0600)]
Remove dup prologue lines

20 years agoDefine VHPT constants from VHPT_SIZE_LOG2.
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 17:31:09 +0000 (11:31 -0600)]
Define VHPT constants from VHPT_SIZE_LOG2.
Prototypes added.

20 years agoChange argument spec for introduce_domain argument parsing, as the MFN is a long.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 17:24:07 +0000 (18:24 +0100)]
Change argument spec for introduce_domain argument parsing, as the MFN is a long.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove recently added uses of errno, as these cause trouble on ia64 builds.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 17:21:38 +0000 (18:21 +0100)]
Remove recently added uses of errno, as these cause trouble on ia64 builds.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNeed additional include for ia64
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 16:46:39 +0000 (10:46 -0600)]
Need additional include for ia64

20 years agoNecessary change to make ia64 dom0 rework:
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 15:15:53 +0000 (09:15 -0600)]
Necessary change to make ia64 dom0 rework:
- All even channels on xen/ia64 shares one common interrupt vector
- xen_start_info is initialized only after xen_init, so adjust
  sequence to avoid access before initialization

Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoMerge
djm@kirby.fc.hp.com [Mon, 24 Oct 2005 15:08:13 +0000 (09:08 -0600)]
Merge

20 years agoRemoved some unnecessary imports.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 14:18:31 +0000 (15:18 +0100)]
Removed some unnecessary imports.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded a timestamp to the logging output by trace_io.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 13:12:42 +0000 (14:12 +0100)]
Added a timestamp to the logging output by trace_io.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDo not create the console tty until domain_create_ring has succeeded. This
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 13:11:07 +0000 (14:11 +0100)]
Do not create the console tty until domain_create_ring has succeeded.  This
means that any reads attempted on that tty will not cause handle_tty_read to
segfault looking for an interface that does not exist.

Move the writing of the tty node so that it happens after console/limit has
been read, as it is cleaner if the writing is the last thing that happens.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agocompute the correct totalram_pages when the balloon increase or decrease the
vhanquez@kneesa.uk.xensource.com [Mon, 24 Oct 2005 11:57:37 +0000 (12:57 +0100)]
compute the correct totalram_pages when the balloon increase or decrease the
reservation. memory reports should be more correct now.

From: Satoshi Uchida <s-uchida@ap.jp.nec.com>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoAttached patch avoids "Bad L1 flags 80" for VMX domains. Thanks Ian for
kaf24@firebug.cl.cam.ac.uk [Mon, 24 Oct 2005 07:04:38 +0000 (08:04 +0100)]
Attached patch avoids "Bad L1 flags 80" for VMX domains. Thanks Ian for
the suggestions.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoChange the semantics of GetDomainPath so that it always succeeds, regardless of
emellor@leeni.uk.xensource.com [Sun, 23 Oct 2005 21:45:15 +0000 (22:45 +0100)]
Change the semantics of GetDomainPath so that it always succeeds, regardless of
whether a domain has been introduced to the store.  Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced.  This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce.  Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.

No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.

Do not write the contents of the info block to the store.  All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoInstead of writing errors to
emellor@leeni.uk.xensource.com [Sun, 23 Oct 2005 21:34:13 +0000 (22:34 +0100)]
Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoEnable TSC-offsetting capability to ensure that VMX
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 15:54:51 +0000 (16:54 +0100)]
Enable TSC-offsetting capability to ensure that VMX
guest's TSC remains in sync with virtual-PIT interrupts.
This avoids the following message from full-virt Linux:
       "Losing too many ticks!
        TSC cannot be used as a timesource. =20
        Possible reasons for this are:
          You're running with Speedstep,
        ......"

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
20 years agoFix an issue for passing arguement from control panel to deivce model
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 15:51:47 +0000 (16:51 +0100)]
Fix an  issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agosome fixes to VMX:
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 10:51:15 +0000 (11:51 +0100)]
some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoReintroduce the changes made by changeset 7455:021324804fbd, which were
emellor@leeni.uk.xensource.com [Sat, 22 Oct 2005 10:04:45 +0000 (11:04 +0100)]
Reintroduce the changes made by changeset 7455:021324804fbd, which were
disabled by workaround 7468:17a9f111fa93.  We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 09:33:26 +0000 (10:33 +0100)]
Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agocpumap cleanups -- Python now deals with lists of cpus
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 07:35:03 +0000 (08:35 +0100)]
cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix assertions in bitops.c.
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:43:56 +0000 (07:43 +0100)]
Fix assertions in bitops.c.

Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>

20 years agoThis patch is to make xentop able to print vcpu usage for out of order
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:37:15 +0000 (07:37 +0100)]
This patch is to make xentop able to print vcpu usage for out of order
enabled vcpus in a domain. This really isn't an issue anymore with the
changes made to dom0 ops and xm/xend.

But, I provide it because:

- Josh noticed my previous patch called getvcpuinfo twice for each vpcu,
which was completely silly.

- this patch would be useful in the remote chance that domain vpcus are
enabled out of order.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoTwo patches were applied to pygrub's setup.py to work around python2.2
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:35:36 +0000 (07:35 +0100)]
Two patches were applied to pygrub's setup.py to work around python2.2
limitations and only one is needed. Revert one of them.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoBackout incautious public/io header changes
djm@kirby.fc.hp.com [Fri, 21 Oct 2005 19:58:39 +0000 (13:58 -0600)]
Backout incautious public/io header changes

20 years agoDisable Xen verbosity by default. At this point I think it
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 19:07:54 +0000 (20:07 +0100)]
Disable Xen verbosity by default. At this point I think it
is best to disable 'scary' warning messages by default,
even though this will also quieten down genuine error
paths.

The ideal solution would be to introduce DPRINTK levels
(e.g., info, warning, error) and allow these to be selected
at compile and/or boot time. We could then enable error
messages until things have stabilised some more.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTemporary workaround to xend start problem.
jrb44@plym.cl.cam.ac.uk [Fri, 21 Oct 2005 17:51:42 +0000 (18:51 +0100)]
Temporary workaround to xend start problem.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoThis is a follow up of PIC device model by Xiaofeng and me to move to
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 17:29:26 +0000 (18:29 +0100)]
This is a follow up of PIC device model by Xiaofeng and me to move to
hypervisor using virtual weired interrupt line.  With this patch the
performance of CPU2K improves 7%, kernel kuild improves 14% and
cyclesoak improves 12%. It is quite amazing!

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoTweak to pygrub build config detection.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 17:19:38 +0000 (18:19 +0100)]
Tweak to pygrub build config detection.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
20 years agoFix allocation of phys_to_machine_mapping array during
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 15:22:09 +0000 (16:22 +0100)]
Fix allocation of phys_to_machine_mapping array during
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd biossums dependency to Makefile to avoid parallel build breakage.
jrb44@plym.cl.cam.ac.uk [Fri, 21 Oct 2005 14:42:26 +0000 (15:42 +0100)]
Add biossums dependency to Makefile to avoid parallel build breakage.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 14:34:17 +0000 (15:34 +0100)]
Merged.

20 years agoExplicitly delete xc instance, which will hopefully solve the intermittent
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 14:31:51 +0000 (15:31 +0100)]
Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix early bootstrap of secondary VCPUs on x86/64.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 13:33:46 +0000 (14:33 +0100)]
Fix early bootstrap of secondary VCPUs on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoBreak proc paths out into separate include file, rather than inlining them.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 12:30:31 +0000 (13:30 +0100)]
Break proc paths out into separate include file, rather than inlining them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:07:14 +0000 (12:07 +0100)]
Merged.

20 years agoBreak common network code in xen-network-common.sh, and common vif hotplugging
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:06:17 +0000 (12:06 +0100)]
Break common network code in xen-network-common.sh, and common vif hotplugging
code into vif-common.sh.

Fix the antispoofing in network-bridge to allow forwarding from physical
device to bridge, and vif0.0 to eth0.

Change the interface between netback driver and vif hotplugging scripts.  The
mac address and bridge details are read from the store directly by the script,
so that the kernel driver does not need to get involved.

Remove an awful lot of cruft from vif-bridge.  Move the iptables handling into
vif-common.sh, and fix it so that the new vif can get past the antispoofing
entries.  Merge vif-nat and vif-route into this structure too.

Use ip instead of ifconfig to get necessary details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTidy xend-config.sxp, removing entries that haven't been used since the
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:04:30 +0000 (12:04 +0100)]
Tidy xend-config.sxp, removing entries that haven't been used since the
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump).  Remove vif-antispoof, as Vifctl no longer passes this option
down.

Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoWork around internal error in some versions of x86/64 gcc
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 10:29:51 +0000 (11:29 +0100)]
Work around internal error in some versions of x86/64 gcc
by manually hoisting gdt address calculation outside loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemoved xen.util.process, as no-one is using it, and it leaves defunct processes
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:22:48 +0000 (11:22 +0100)]
Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused Vifctl.vifctl and Vifctl.set_vif_name. Remove the bridge and
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:21:05 +0000 (11:21 +0100)]
Remove unused Vifctl.vifctl and Vifctl.set_vif_name.  Remove the bridge and
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside.  Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.

Remove XendRoot.get_vif_antispoof, matching change above.

Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOutput the Xen changeset in the logs at start of day.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:08:48 +0000 (11:08 +0100)]
Output the Xen changeset in the logs at start of day.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUpgrade tree to 2.6.12.6.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:46:30 +0000 (10:46 +0100)]
Upgrade tree to 2.6.12.6.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate one file from qemu 0.71 for Cirrus Logic VGA device model.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:24:35 +0000 (10:24 +0100)]
Update one file from qemu 0.71 for Cirrus Logic VGA device model.
Using the older device model running pinball game on windows with
full screen can cause guest crash.

Signed-off-by: yunhong.jiang@intel.com
20 years agoSend special keys that your graphical user interface intercepts at
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:20:38 +0000 (10:20 +0100)]
Send special keys that your graphical user interface intercepts at
low level, such as ctrl-alt-del in X Window.

Adds a command "sendkey" to deal with it in the monitor, you
can send keys to the vm. Use - to press several keys simultaneously.
Example:
sendkey ctrl-alt-f1

Signed-off-by: Dan Xu <dan.d.xu@intel.com>
Signed-off-by: Zhai, Edwin <edwin.zhai@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoTurn off some debug switches by default
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:17:29 +0000 (10:17 +0100)]
Turn off some debug switches by default
These macros cause extra prints in /var/log/xend-debug, and
affect the performance.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoThis patch to the Xen access control module (ACM) and tools:
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 20:37:15 +0000 (21:37 +0100)]
This patch to the Xen access control module (ACM) and tools:

  1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized
domains to retrieve policy decisions regarding the sharing of resources
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in
domain 0; currently there is no enforcement in Dom0 and all packets flow
freely
   *  the security policy in block device backends to control which
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision
ACM interface call, it is in tools/security/get_decision.c and will be
compiled together with the policy tools. As usual, the ACM is unconfigured
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>

20 years agoAvoid specifying bogus DISPLAY=None when spawning device model.
jrb44@plym.cl.cam.ac.uk [Thu, 20 Oct 2005 18:37:41 +0000 (19:37 +0100)]
Avoid specifying bogus DISPLAY=None when spawning device model.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoSet antispoof default to yes, as this seems safer, and is the current behaviour
emellor@leeni.uk.xensource.com [Thu, 20 Oct 2005 13:06:07 +0000 (14:06 +0100)]
Set antispoof default to yes, as this seems safer, and is the current behaviour
in VifCtl.

Signed-off-by: Ewan Mellor <ewan@xensource.com>